package dou;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ding {
    public static void main(String[] args) {
        new Thread(() -> {
            var s = new Date().getTime();
            var ss = "2021-12-24 09:05:00";
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            long q = 0l;
            try {
                q = sdf.parse(ss).getTime();
            } catch (ParseException e) {
                e.printStackTrace();
            }
            while (true) {
                var t = System.currentTimeMillis();
                if (t == q) break;
            }
            try {
                System.out.println("重启中*");
                Thread.sleep(5000);
                System.out.println("重启中**");
                Thread.sleep(5000);
                System.out.println("重启中***");
                Thread.sleep(5000);
                System.out.println("重启中****");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }).start();
    }
}
